package mote;

/**
 * EventManager registers events that are triggered if the condition is met. (To be implemented in the future)
 * @author Khalid AlHokail
 *
 */
public class EventManager {
	enum Condition {HIGHER, LOWER, EXACT};
	enum Level {LIGHT, DARK};
	
	/**
	 * Creates a new EventManager to the MoteCollection motes
	 * @param motes	the MoteCollection variable to observe
	 */
	EventManager(MoteCollection motes)
	{
	}
	
	/**
	 * Registers a new event and adds it to the event queue
	 * @param times The number of times to execute this event (-1 for infinity)
	 * @param moteID The mote in which this event belongs to (-1 for all motes)
	 * @param cond The condition that triggers this event depending on the value of "value". Can be one of the following: HIGHER, LOWER, EXACT
	 * @param value The value that triggers this event. This also can be LIGHT or DARK instead of a specific value.
	 * @param offset The offset of the value that triggers this event. For example, if value = 10 and offset = 2, then triggering value will be between 8 and 12
	 * @param function The function to execute if the condition cond and value are met. The signature of the function should be in the format (void *, Mote *) where the first argument is described next, and Mote is a pointer to the Mote that triggered the event. (Should be a pointer to a function)
	 * @param arg A user defined argument to be passed to the function. (Should be a pointer to a user data type)
	 * @return the ID of the event
	 */
	int RegisterEvent(int times, int moteID, Condition cond, int value, int offset, int function, int arg)
	{
		//to be implemented
	}
	
	/**
	 * Removes an event from the event queue
	 * @param eventID the event ID to be deleted
	 * @return Whether the event is deleted or not
	 */
	boolean DeleteEvent(int eventID)
	{
		//to be implemented
	}	
}
